<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('grade/index')}">所有积分</a></li>
        <li><a href="{:url('grade/add')}">添加积分</a></li>
        <li class="active"><a>编辑积分</a></li>
    </ul>
    <form class="form-horizontal js-ajax-form margin-top-20" action="{:url('grade/edit')}" method="post">
        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label">所有课程:</label>
            <div class="col-md-6 col-sm-10">
                <select name="subject_id" id="subject_id" class="form-control">
                    <option value="0">请选择课程</option>
                    <volist name="subject" id="vo">
                        <if $data.subject_id == $vo.id>
                            <option value="{$vo.id}" selected>{$vo.name}</option>
                            <else>
                                <option value="{$vo.id}">{$vo.name}</option>
                            </else>
                        </if>
                    </volist>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label">所有学生:</label>
            <div class="col-md-6 col-sm-10">
                <select name="student_id" id="subject" class="form-control">
                    <option value="0">请选择学生</option>
                    <volist name="student" id="vo">
                        <if $data.student_id == $vo.id>
                            <option value="{$vo.id}" selected>{$vo.name}</option>
                            <else>
                                <option value="{$vo.id}">{$vo.name}</option>
                            </else>
                        </if>
                    </volist>
                </select>
            </div>
        </div>

        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label">积分名称:</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-name" name="name" value="{$data.name}" >
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="hidden" name="id" value="{$data.id}"/>
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('EDIT')}</button>
                <a class="btn btn-default" href="{:url('admin/grade/index')}">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>
